Public Class frmStatus

    Private Sub frmStatus_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Public Sub Convert()

        Dim x As NWN2Toolset.NWN2.Data.NWN2GameModule        
        Dim curKey As String
        Dim count As Integer = 0
        x = NWN2Toolset.NWN2ToolsetMainForm.App.Module
        Dim y As NWN2Toolset.NWN2.Data.NWN2GameConversation

        For Each curKey In x.Conversations.Keys
            y = x.Conversations.Item(curKey)
            y.Demand()
            If y.MultiplayerCutscene Then
                y.MultiplayerCutscene = False
                count += 1
                y.OEISerialize(False)
                y.Release()
                lblCount.Text = count.ToString
                Me.Update()
            End If
        Next
        btnDone.Visible = True
        btnCampaign.Visible = True
    End Sub



    Private Sub btnDone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDone.Click        
        Me.Close()
    End Sub

    Private Sub btnCampaign_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCampaign.Click
        Dim camp As NWN2Toolset.NWN2.Data.Campaign.NWN2Campaign
        Dim conver As NWN2Toolset.NWN2.Data.NWN2GameConversation
        Dim count As Integer = 0
        Dim curKey As String
        lblCount.Text = count.ToString
        Me.Update()
        btnDone.Enabled = False
        camp = NWN2Toolset.NWN2.Data.Campaign.NWN2CampaignManager.Instance.ActiveCampaign
        For Each curKey In camp.Conversations.Keys
            conver = camp.Conversations.Item(curKey)
            conver.Demand()
            If conver.MultiplayerCutscene Then
                conver.MultiplayerCutscene = False
                count += 1                
                conver.OEISerialize(False)
                conver.Release()
                lblCount.Text = count.ToString
                Me.Update()
            End If
        Next
        btnDone.Enabled = True
    End Sub

End Class